package com.gzj.environment.model.system.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.gzj.environment.model.base.BaseEntity;
import com.gzj.environment.model.system.dto.RoleSaveDto;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

/**
 * 角色的实体类
 */
@TableName("sys_role")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Role extends BaseEntity {

    private String roleName;
    private String description;
    private Integer sort;

    public Role(RoleSaveDto roleSaveDto) {
        BeanUtils.copyProperties(roleSaveDto, this);
    }
}
